package com.budwk.app.sqfw.models;

import com.budwk.starter.common.openapi.annotation.ApiModel;
import com.budwk.starter.common.openapi.annotation.ApiModelProperty;
import com.budwk.starter.database.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;

import java.io.Serializable;
import java.util.Date;


@Data
@EqualsAndHashCode(callSuper = true)
@Table("shequ.sqfw_servicerecord")
@Comment("通讯服务记录")
@ApiModel(description = "通讯服务记录")
public class Sqfw_servicerecord extends BaseModel implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column
    @Name
    @Comment("编号")
    @ApiModelProperty(description = "ID")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    @PrevInsert(uu32 = true, nullEffective = true)
    private String id;

    @Column
    @Comment("用户姓名")
    @ApiModelProperty(description = "用户姓名")
    @ColDefine(type = ColType.VARCHAR, width = 120)
    private String customer_name;

    @Column
    @Comment("用户手机号")
    @ApiModelProperty(description = "用户手机号")
    @ColDefine(type = ColType.VARCHAR, width = 100)
    private String customer_phone;

    @Column
    @Comment("通话对象")
    @ApiModelProperty(description = "通话对象")
    @ColDefine(type = ColType.VARCHAR, width = 100)
    private String connect_obj;

    @Column
    @Comment("用户地址")
    @ApiModelProperty(description = "用户地址")
    @ColDefine(type = ColType.VARCHAR, width = 50)
    private String customer_address;

    @Column
    @Comment("录音文件")
    @ApiModelProperty(description = "录音文件")
    @ColDefine(type = ColType.VARCHAR, width = 200)
    private String recording_file;

    @Column
    @Comment("录音文本")
    @ApiModelProperty(description = "录音文本")
    @ColDefine(type = ColType.TEXT)
    private String recording_text;

    @Column
    @Comment("事件类型")
    @ApiModelProperty(description = "事件类型")
    @ColDefine(type = ColType.VARCHAR, width = 200)
    private String type;

    @Column
    @Comment("用户需求简要")
    @ApiModelProperty(description = "access_token")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String customer_need;

    @Column
    @Comment("接办人姓名")
    @ApiModelProperty(description = "接办人姓名")
    @ColDefine(type = ColType.VARCHAR, width = 50)
    private String service_name;

    @Column
    @Comment("接办人手机")
    @ApiModelProperty(description = "接办人手机")
    @ColDefine(type = ColType.VARCHAR, width = 50)
    private String service_phone;

    @Column
    @Comment("接待时间")
    @ApiModelProperty(description = "接待时间")
    @ColDefine(type = ColType.DATETIME)
    private Date receive_time;

    @Column
    @Comment("完成时间")
    @ApiModelProperty(description = "完成时间")
    @ColDefine(type = ColType.DATETIME)
    private Date finish_time;

    @Column
    @Comment("处理结果")
    @ApiModelProperty(description = "处理结果")
    @ColDefine(type = ColType.VARCHAR, width = 200)
    private String handle_result;

    @Column
    @Comment("处理详情")
    @ApiModelProperty(description = "处理详情")
    @ColDefine(type = ColType.VARCHAR, width = 200)
    private String handle_detail;

    @Column
    @Comment("腾讯云处理taskid")
    @ColDefine(type = ColType.VARCHAR, width = 200)
    private String taskId;


    @Column
    @Comment("电话接通时间")
    @ApiModelProperty(description = "电话接通时间")
    @ColDefine(type = ColType.DATETIME)
    private Date connect_time;

    @Column
    @Comment("电话结束时间")
    @ApiModelProperty(description = "电话结束时间")
    @ColDefine(type = ColType.DATETIME)
    private Date end_time;

    @Column
    @Comment("通话时长")
    @ApiModelProperty(description = "通话时长")
    @ColDefine(type = ColType.INT)
    private Long duration;


    @Column
    @Comment("标签")
    @ColDefine(type = ColType.VARCHAR, width = 200)
    private String label;


    @Column
    @Comment("备注")
    @ColDefine(type = ColType.VARCHAR, width = 800)
    private String remarks;

    @Column
    @Comment("前端唯一标识")
    @ColDefine(type = ColType.VARCHAR, width = 800)
    private String app_type;

    @Column
    @Comment("用户id")
    @ColDefine(type = ColType.VARCHAR, width = 800)
    private String user_id;

    @Column("finish_status")
    @Comment("完成状态")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String finishStatus;


    @Column("dfxy_status")
    @Comment("是否推送东方祥云")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String dfxyStatus;

    @Column("android_file")
    @Comment("安卓本地文件")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String androidFile;

    @Column("file_channel")
    @Comment("录音文件渠道")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String fileChannel;

    @Column("copy_name")
    @Comment("抄送人姓名")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String copyName;

    @Column("copy_phone")
    @Comment("抄送人电话")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String copyPhone;

    @Column("company_name")
    @Comment("上传人所属公司名称")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String companyName;

    @Column("hzqd")
    @Comment("获知渠道")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String hzqd;

    // 时间条件
    private String queryTime;

    // wzy 2023-10-10 新增四个字段 用于数据权限
    @Column("province")
    @Comment("省份")
    @ApiModelProperty(description = "省份")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String province;

    @Column("city")
    @Comment("市")
    @ApiModelProperty(description = "市")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String city;

    @Column("district")
    @Comment("区")
    @ApiModelProperty(description = "区")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String district;

    @Column("county")
    @Comment("街道")
    @ApiModelProperty(description = "街道")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String county;

    @Column("community")
    @Comment("社区")
    @ApiModelProperty(description = "社区")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String community;

    @Column("rally_id")
    private String rallyId;

    @Column("auto_create_task")
    @Comment("自动创建任务标识1-自动创建，空或者其他手动创建（创建记录时临时创建一个任务（条件：同一个任务类型同一个人只创建一次（观山湖2.0APP 去掉了任务，因此这里临时创建）））")
    @ApiModelProperty(description = "自动创建任务标识（创建记录时临时创建一个任务（条件：同一个任务类型同一个人只创建一次（观山湖2.0APP 去掉了任务，因此这里临时创建）））")
    private Integer autoCreateTask;

    @Column
    @Comment("删除标记")
    @ColDefine(type = ColType.BOOLEAN)
    private Boolean delFlag;



    /**
     * 任务记录是否有文件可以下载,给前端判断是否显示下载图标
     */
    private boolean downFlag = false;

    private String unitId;
    private String unitName;
    private boolean status = false;
}
